package cn.xzqwjw.taskmanager.common.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author rush
 */
@Documented
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = ParamDateTimeValidatorClass.class)
public @interface ParamDateTimeValidator {

  String format() default "yyyy-MM-dd HH:mm:ss";

  // 前端传递的日期时间格式不正确时的提示内容
  String message() default "日期时间格式不正确";
  // String message() default "{javax.validation.constraints.DateTimeStr.message}";

  Class<?>[] groups() default {};

  // payload 有效载荷
  Class<? extends Payload>[] payload() default {};

}
